package com.cxy.caiapiinterface.controller;

import com.cxy.caiapiinterface.manager.SearchFacade;
import com.cxy.caiapiinterface.model.dto.search.SearchRequest;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;


@RestController

public class SearchController {

    @Resource
    private SearchFacade searchFacade;

    @PostMapping("/api/search/all")
    public String searchAll(@RequestBody SearchRequest searchRequest){

        return searchFacade.searchAll(searchRequest);
    }
}
